package com.iot.core.model;

import java.util.List;

import org.springframework.data.cassandra.mapping.PrimaryKey;

import com.witsight.cassandra.model.BaseEntity;

/**
 * 
 * @author penght
 *
 */
public class Pos extends BaseEntity<PosKey>{
	
	//serialVersionUID
	private static final long serialVersionUID = -1836624266198283954L;

	//primary key
	@PrimaryKey
	private PosKey id;
	
	//distrilbutorId
	private Integer distrilbutorId;
	
	//transactions
	private List<Integer> transactions;
	
	//hqId
	private Integer hqId;
	
	
	public List<Integer> getTransactions() {
		return transactions;
	}

	public void setTransactions(List<Integer> transactions) {
		this.transactions = transactions;
	}

	public Integer getHqId() {
		return hqId;
	}

	public void setHqId(Integer hqId) {
		this.hqId = hqId;
	}

	public void setId(PosKey id) {
		this.id = id;
	}

	@Override
	public PosKey getId() {
		return id;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) {
			return true;
		}
		if (!(o instanceof Pos)) {
			return false;
		}

		final Pos pos = (Pos) o;
		return !(this.getId() != null ? !this.getId().equals(pos.getId()) : pos.getId() != null);
	}

	public Integer getDistrilbutorId() {
		return distrilbutorId;
	}

	public void setDistrilbutorId(Integer distrilbutorId) {
		this.distrilbutorId = distrilbutorId;
	}

}
